﻿using UnityEngine;
using System.Collections;

public class B3Constants {
	public const int BYTE_MIN = -128;
	public const int BYTE_MAX = 127;
	
	public static bool b8(int v) {
		return BYTE_MIN <= v && BYTE_MAX >= v;
	}
	
	public static bool b8(long v) {
		return BYTE_MIN <= v && BYTE_MAX >= v;
	}
	
	public const int SHORT_MIN = -32768;
	public const int SHORT_MAX = 32767;
	
	public static bool b16(int v) {
		return SHORT_MIN <= v && SHORT_MAX >= v;
	}
	
	public static bool b16(long v) {
		return SHORT_MIN <= v && SHORT_MAX >= v;
	}
	
	public const long INT_MIN = 0x80000000;
	public const long INT_MAX = 0x7fffffff;
	
	public static bool b32(long v) {
		return INT_MIN <= v && INT_MAX >= v;
	}
	
	//public const Charset UTF_8 = Charset.forName("UTF-8");

}
